﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SD.DataAccess
{
    public static class BussinessDao
    {
        private static readonly ServiceDBDataContext dataContext = new ServiceDBDataContext();

        public static BusinessType GetBusiness(int businessId)
        {
            BusinessType newbusiness = dataContext.BusinessTypes.FirstOrDefault(item => item.BusinessId == businessId);
            return newbusiness;
        }

        public static BusinessType GetBusinessByName(string businessName)
        {
            BusinessType newbusiness = dataContext.BusinessTypes.FirstOrDefault(item => item.BusinessName == businessName);
            return newbusiness;
        }
    }
}
